package com.yz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yz.entity.Section;
import com.yz.entity.Student;
import com.yz.entity.Teacher;
import com.yz.mapper.SectionMapper;
import com.yz.mapper.TeacherMapper;
import com.yz.service.TeacherService;

/**
 * 教师表实现类
 * @author 于万伟
 *
 */
@Service
public class TeacherServiceImpl implements TeacherService{
	@Autowired
	TeacherMapper teacherMapper;
	@Autowired
	SectionMapper sectionMapper;

	@Override
	public List<Teacher> getTea(Teacher teacherDto) {
		return teacherMapper.getTea(teacherDto);
	}

	@Override
	public boolean addTea(Teacher teacher) {
		return teacherMapper.addTea(teacher);
	}

	@Override
	public boolean updateTea(Teacher teacher) {
		return teacherMapper.updateTea(teacher);
	}

	@Override
	public boolean delTea(int tid) {
		return teacherMapper.delTea(tid);
	}

	@Override
	public Teacher getTeaById(int id) {
		return teacherMapper.getTeaById(id);
	}

	@Override
	public List<Section> getAllSec() {
		return sectionMapper.getAllSec();
	}

	@Override
	public List<Teacher> queryByTids(String tids) {
		String[] split = tids.split(",");
		return teacherMapper.queryByTids(split);
	}

	
}
